package 力扣._00周赛._368周赛.问题1;

public class Solution {
    public int minimumSum(int[] nums) {
        int min = 9999999;
        for (int i = 0; i < nums.length; i++) {
            for (int j = i + 1; j < nums.length; j++) {
                for (int k = j + 1; k < nums.length; k++) {
                    if (nums[i] < nums[j] && nums[k] < nums[j]) {
                        int t = nums[i] + nums[j] + nums[k];
                        min = Math.min(t, min);
                    }
                }
            }
        }
        if(min==9999999)
            return -1;
        return min;

    }
}
